Skip to content

Conversation

@ajpotts
Copy link
Contributor

@ajpotts ajpotts commented Jan 9, 2026

Add NumPy Alignment Tests for pdarray Manipulation Functions

Summary

This PR adds a comprehensive NumPy alignment test suite for pdarray manipulation functions (hstack, vstack, append, and delete). The goal is to explicitly verify Arkouda behavior against NumPy for both successful operations and expected error cases, improving confidence in API compatibility and surfacing semantic mismatches early.

Key Changes

  • New alignment test suite
    • Added tests/numpy/alignment_verification/pdarraymanipulation_alignment.py
    • Covers 1D and 2D inputs, dtype promotion, NaN handling, axis semantics, and error behavior
    • Separates successful alignment cases from expected failure cases to match NumPy semantics
  • Test discovery
    • Registered the new test file in pytest.ini

Notable Alignment Decisions

  • vstack with mismatched 1D lengths:
    • NumPy raises ValueError
    • Arkouda currently raises a server-side RuntimeError
    • Tests assert semantic equivalence (both must raise), without over-constraining the exception type
  • Floating-point comparisons use assert_allclose(..., equal_nan=True) for NumPy-version stability

Why This Matters

  • Establishes a clear, executable contract between Arkouda and NumPy behavior
  • Makes regressions in shape, dtype, or axis handling immediately visible
  • Provides a pattern for future NumPy-alignment test suites

Closes #5269: alignment tests for arkouda.numpy.pdarraymanipulation

@ajpotts ajpotts force-pushed the 5269_alignment_tests_for_arkouda.numpy.pdarraymanipulation branch from 5385ede to efdaec3 Compare January 9, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alignment tests for arkouda.numpy.pdarraymanipulation

1 participant